<template>
	<view class="contain">
		<view class="" style="margin-top: 30rpx;">
			<uni-forms ref="form" v-model="formdata">
				<uni-forms-item label="意见标题" name="">
					<uni-easyinput v-model="formdata.feedbackTitle" placeholder="请输入意见标题"></uni-easyinput>
				</uni-forms-item>
				<uni-forms-item label="意见标题" name="">
					<textarea maxlength="150字" style="border: 1px solid gray;" v-model="formdata.feedbackDetails" placeholder="请输入意见标题" name="" id="" cols="30" rows="10"></textarea>
				</uni-forms-item>
			</uni-forms>
			
			<button @click="submit">提交</button>
			<view @click="hository" class="" style="text-align: center;margin-top: 20px;">反馈历史</view>
		</view>
	</view>
</template>

<script>
	import * as request from '@/unitl.js'
	export default {
		data() {
			return {
				formdata:{
					feedbackTitle:'',
					feedbackDetails:""
				}
				
			}
		},
		methods: {
			hository(){
				uni.navigateTo({
					url:"/pages/meanlist/meanlist"
				})
			},
			async submit(){
				const res=await request.default.adduseradv(this.formdata)
				console.log(res)
				if(res.data.code==200){
					uni.showToast({
						icon:"success",
						title:res.data.msg,
						// complete:()=> {
							
						// title:res.msg,
					})
				}else{
					uni.showToast({
						icon:'error',
						title:res.data.msg
					})
				}
				
			}
			
		}
	}
</script>

<style>

</style>
